package com.atgm.mall.gmmailware.dao;

import com.atgm.mall.gmmailware.entity.WareGameEntity;
import com.atgm.mall.gmmailware.vo.req.WareGameItemVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface WareGameDao extends BaseMapper<WareGameEntity> {

    /**
     * 锁定库存
     * @param wareGameItemVo
     * @return
     */
    Integer lockStock(WareGameItemVo wareGameItemVo);

    /**
     * 解锁库存
     * @param gameId
     * @return
     */
    Integer unlockStock(@Param("gameId") Long gameId);
}
